package com.unitd.filesystem.comm.fdfs;

import java.net.InetSocketAddress;

/**
 * @desc fastDFS的连接和初始化及性能优化参数实体对象,
 * 此类中定义与fastDFS相关的实体属性,并与filesystem.properties文件中与fastDFS配置相关的属性基本对应
 * @filename FdfsSetting.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date 2017/3/8
 */
public class FdfsSetting {

	/** 提供文件服务的文件系统服务名称;对应参数:fs.group1.provider */
	private String provider;
	/** 所属组名; 对应参数fs.groupNames中的某个或某些 */
	private String group;
	/** fastDFS连接超时时长; 默认2000毫秒; 对应参数:fs.group1.connect_timeout */
	private Integer connectTimeout;
	/** 网络超时时间, 默认3000毫秒; 对应参数:fs.group1.network_timeout */
	private Integer networkTimeout;
	/** 是否启用防盗链Token, 默认false; 对应参数:fs.group1.anti_steal_token */
	private Boolean antiStealToken;
	/** 字符集, 默认UTF-8; 对应参数:fs.group1.charset */
	private String charset;
	/** 连接密钥, 默认为空; 对应参数:fs.group1.secret_key */
	private String secretKey;
	/** fastDFS单次最大处理线程数, 默认为100; 对应参数:fs.group1.maxThreads */
	private Integer maxThreads;
	/** Tracker Server提供HTTP服务的端口, 默认为7271; 对应参数:fs.group1.tracker_http_port */
	private Integer trackerHttpPort;
	/** fastDFS的跟踪服务(Tracker Server)的地址及端口(多个服务之间用,分割); 对应参数:fs.group1.tracker_group */
	private InetSocketAddress[] trackerGroup;
	/** 配置ngin代理和存储服务同步后的ngin地址地址为storage存储服务器对应的nginx地址; 对应参数:fs.group1.urlprefix */
	private String urlprefix;

	public String getProvider() {
		return provider;
	}

	public void setProvider(String provider) {
		this.provider = provider;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public Integer getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(Integer connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public Integer getNetworkTimeout() {
		return networkTimeout;
	}

	public void setNetworkTimeout(Integer networkTimeout) {
		this.networkTimeout = networkTimeout;
	}

	public Boolean getAntiStealToken() {
		return antiStealToken;
	}

	public void setAntiStealToken(Boolean antiStealToken) {
		this.antiStealToken = antiStealToken;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public String getSecretKey() {
		return secretKey;
	}

	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}

	public Integer getMaxThreads() {
		return maxThreads;
	}

	public void setMaxThreads(Integer maxThreads) {
		this.maxThreads = maxThreads;
	}

	public Integer getTrackerHttpPort() {
		return trackerHttpPort;
	}

	public void setTrackerHttpPort(Integer trackerHttpPort) {
		this.trackerHttpPort = trackerHttpPort;
	}

	public InetSocketAddress[] getTrackerGroup() {
		return trackerGroup;
	}

	public void setTrackerGroup(InetSocketAddress[] trackerGroup) {
		this.trackerGroup = trackerGroup;
	}

	public String getUrlprefix() {
		return urlprefix;
	}

	public void setUrlprefix(String urlprefix) {
		this.urlprefix = urlprefix;
	}
}